package com.stx.jeepay.payment.channel;

import com.stx.jeepay.core.service.SysConfigService;
import com.stx.jeepay.payment.service.ConfigContextQueryService;
import com.stx.jeepay.payment.utils.ChannelCertConfigKitBean;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 退款接口抽象类
 */
public abstract class AbstractRefundService implements IRefundService {
    @Autowired
    protected SysConfigService sysConfigService;
    @Autowired
    protected ChannelCertConfigKitBean channelCertConfigKitBean;
    @Autowired
    protected ConfigContextQueryService configContextQueryService;

    protected String getNotifyUrl() {
        return sysConfigService.getDBApplicationConfig().getPaySiteUrl() + "/api/refund/notify/" + getIfCode();
    }

    protected String getNotifyUrl(String refundOrderId) {
        return sysConfigService.getDBApplicationConfig().getPaySiteUrl() + "/api/refund/notify/" + getIfCode() + "/" + refundOrderId;
    }
}
